package com.atguigu.day21.other06;

import org.junit.Test;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/*
Properties
 */
public class PropertiesTest {

    @Test
    public void test03(){
        Properties p = new Properties();
        PropertiesTest.class.getClassLoader().getResourceAsStream("mysql.porperties");
    }

    @Test
    public void test02() throws IOException {
        Properties p = new Properties();
        System.out.println("p = " + p);
        InputStream inputStream = PropertiesTest.class.getClassLoader().getResourceAsStream("mysql.properties");
        p.load(inputStream);

       // System.out.println("p = " + p);
        p.list(System.out);
    }

    @Test
    public void test01() {

        Properties properties = System.getProperties();

        properties.list(System.out);

    }
}
